#ifndef VECTOR_H
#define VECTOR_H

#include "point.h"

#define deg2rad(value) ((M_PI / 180) * (value + 90))

/***************************************************************
 * CLASS : Vector
 ***************************************************************/
class Vector : public Point
{
protected:
   //Point  point;
   float  m_dx;
   float  m_dy;
   float  m_magnitude;
   double m_angle;
   float  m_speed;

public:
   Vector() {};
   Vector &operator =  (const Vector &rhs);
   Vector &operator += (const Vector &rhs);
   void    operator ++ (int postfix);

   float  getDx()    const { return m_dx;        }
   float  getDy()    const { return m_dy;        }
   float  getMagn()  const { return m_magnitude; }
   double getAngle() const { return m_angle;     }
   Point  getPoint();

   void   setDx   (const float  dx ) { m_dx        = dx;  }
   void   setDy   (const float  dy ) { m_dy        = dy;  }
   void   setMagn (const float  mag) { m_magnitude = mag; }
   void   setSpeed(const float  spd) { m_speed     = spd; }
   void   setAngle(const double ang) { m_angle     = ang; }
   void   setPoint(const Point  &p );

   void   wrap();
};

#endif // VECTOR_H
